﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using MethodWorx.CMS.UI.Application.ActionResults;
using System.Web;

namespace MethodWorx.CMS.Plugins.ActionResults
{
    public class OpenDialogResult : AppJavaScriptResult
    {
        public OpenDialogResult(string url, string title)
            : base(GetScript(url, title))
        {
        }

        private static string GetScript(string url, string title)
        {
            return "window.parent.openDialog(resolveUrl('" + url + "'), '" + title + "');";
        }
    }
}
